package com.yjt.gcss.gddw.common.dao;

import java.util.ArrayList;
import java.util.Collection;

import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Order;
import org.springframework.stereotype.Service;

import com.yjt.common.easyui.datagrid.DataGridDAOImpl;
import com.yjt.common.hibernate.base.DaoException;
import com.yjt.gcss.gddw.common.bean.domain.UiDkxy;

@Service(UiDkxyDao.BEAN_PACKAGE_NAME)
public class UiDkxyDao extends DataGridDAOImpl {

	public static final String BEAN_PACKAGE_NAME = "com.yjt.gcss.gddw.common.dao.UiDkxyDao";
	public UiDkxyDao(){

	}

	public UiDkxy getBeanById(String jybsh) throws DaoException {
		return (UiDkxy) getBeanById(UiDkxy.BEAN_PACKAGE_NAME, jybsh, false);
	}
	
	public UiDkxy getBeanByIdForUpdate(String id) throws DaoException {
		return (UiDkxy) getBeanById(UiDkxy.BEAN_PACKAGE_NAME, id, true);
	}

	@SuppressWarnings("rawtypes")
	public Collection getAll() throws DaoException {
		return getAll(UiDkxy.BEAN_PACKAGE_NAME);
	}

	@SuppressWarnings("rawtypes")
	public UiDkxy getBeanByParams(String hqlName,ArrayList paraList) throws DaoException{
		return (UiDkxy) getProtoBeanByParams(hqlName,paraList);
	}

	public UiDkxy getBeanByBean(UiDkxy bean, MatchMode mode) throws DaoException{
		return (UiDkxy) getProtoBeanByBean(bean, mode);
	}
	
	public UiDkxyDao setOrder(Order order){
		return (UiDkxyDao)super.addOrder(order);
	}
}
